package com.aw.manual.ejemplo010;

import org.springframework.beans.factory.support.MethodReplacer;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

/**
 * User: gmc
 * Date: 31/05/2010
 */
@Component
public class SumarAdulterado implements MethodReplacer{
    public Object reimplement(Object o, Method method, Object[] objects) throws Throwable {
        Integer sum1 = (Integer) objects[0];
        Integer sum2 = (Integer) objects[1];
        System.out.println("Sumandos:<"+sum1+","+sum2+"> Resultado:"+(sum1+sum2+1));
        return null;
    }
}
